import { ApiResponse } from '@/types/http.d';
import { default as axios } from '@/utils/request';
/**
 * 简历相关接口
 */
class ResumeService {
  // static SeekerResumeOriginal<T>() {
  //   throw new Error('Method not implemented.');
  // }
  // 获取求职者基本信息--简历页使用
  static selectSeekerBaseInfo<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerBaseInfo',
      method: 'get',
    });
  }

  // 编辑基本信息
  static editSeekerInfo<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/editSeekerInfo',
      method: 'post',
      data,
    });
  }

  // 查询求着者求职意向
  static selectSeekerPurpose<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerPurpose',
      method: 'get',
    });
  }

  // 查询求职者个人优势
  static selectSeekerAdvantage<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerAdvantage',
      method: 'get',
    });
  }

  // 查询用户工作经历
  static selectSeekerWorkExperience<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerWorkExperience',
      method: 'get',
    });
  }

  // 添加用户工作经历
  static addSeekerWorkExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/addSeekerWorkExperience',
      method: 'post',
      data,
    });
  }

  // 编辑用户工作经历
  static editSeekerWorkExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/editSeekerWorkExperience',
      method: 'post',
      data,
    });
  }

  // 查询用户项目经历
  static selectSeekerProjectExperience<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerProjectExperience',
      method: 'get',
    });
  }

  // 添加用户项目经历
  static addSeekerProjectExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/addSeekerProjectExperience',
      method: 'post',
      data,
    });
  }

  // 编辑用户项目经历
  static editSeekerProjectExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/editSeekerProjectExperience',
      method: 'post',
      data,
    });
  }

  // 查询用户教育经历
  static selectSeekerEducationExperience<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerEducationExperience',
      method: 'get',
    });
  }

  // 编辑用户教育经历
  static editSeekerEducationExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/editSeekerEducationExperience',
      method: 'post',
      data,
    });
  }

  // 添加用户教育经历
  static addSeekerEducationExperience<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/addSeekerEducationExperience',
      method: 'post',
      data,
    });
  }

  // 查询用户证书
  static selectSeekerProfessional<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerProfessional',
      method: 'get',
    });
  }
  // 查询用户证书
  static selectSeekerCertificate<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectSeekerCertificate',
      method: 'get',
    });
  }

  // 查询证书集合
  static selectCertificateListFromRedis<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectCertificateListFromRedis',
      method: 'get',
    });
  }
  // 查询职业资格
  static selectProfessionalList<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectProfessionalList',
      method: 'get',
    });
  }

  // 添加用户证书
  static addSeekerCertificate<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/addSeekerCertificate',
      method: 'post',
      data,
    });
  }
  // 添加职业资格
  static addSeekerProfessional<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/addSeekerProfessional',
      method: 'post',
      data,
    });
  }
  // 查询求职者个人竞争力模型
  static selectResumeModel<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectResumeModel',
      method: 'get',
      params,
    });
  }

  // 查询求职者个人综合能力
  static selectResumePredictedCapability<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectResumePredictedCapability',
      method: 'get',
      params,
    });
  }

  // 查询求职者个人背景行业
  static selectResumePredictedIndustry<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectResumePredictedCapability',
      method: 'get',
      params,
    });
  }

  // 增加或编辑个人优势
  static editOrAddSeekerAdvantage<T = any>(data: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/editOrAddSeekerAdvantage',
      method: 'post',
      data,
    });
  }

  // 个人简历的完善程度
  static selectResumePerfection<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectResumePerfection',
      method: 'get',
    });
  }

  // 个人简历预览转换后地址
  static selectResumeOriginal<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/selectResumeOriginal',
      method: 'get',
    });
  }

  static downloadResumeFile(params: any, args: any = {}) {
    return downloader(`/seeker-web/v1/downloadResumeFile`, {
      method: 'get',
      ...args,
      params,
    });
  }

  // 上传简历
  static uploadResume(data: any) {
    return axios<ApiResponse<any>>({
      url: '/seeker-web/v1/uploadResume',
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data',
      },
    });
  }

  // 查询导入日志信息
  static selectAnalsisResumeFromSeekerLogById(params: any) {
    return axios<ApiResponse<any>>({
      url: `/seeker-web/v1/selectAnalsisResumeFromSeekerLogById`,
      method: 'get',
      params,
    });
  }
}

export default ResumeService;
